package org.yanse.node;

import java.util.ArrayList;
import java.util.List;

public class TreeNode<T extends Number> {
    private T id;
    private T pid;
    private List<TreeNode<T>> children = new ArrayList<>();

    private TreeNode() {
    }

    public TreeNode(T id, T pid) {
        this.id = id;
        this.pid = pid;
    }

    public T getId() {
        return id;
    }

    public void setId(T id) {
        this.id = id;
    }

    public T getPid() {
        return pid;
    }

    public void setPid(T pid) {
        this.pid = pid;
    }

    public List<TreeNode<T>> getChildren() {
        return children;
    }

    public void setChildren(List<TreeNode<T>> children) {
        this.children = children;
    }
}
